<?php

use Illuminate\Database\Seeder;

class AnswerSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
		$data = [];
        for ($i=0; $i < 50; $i++) { 
        	$tem['question_id'] = rand(1,6);
        	$tem['user_id'] = rand(1,100);
        	$tem['answer_content'] = str_random(20);
        	// $tem['content'] = str_random(50);
        	// $tem['pic'] = '/uploads/c5e347f8f356ac67c48a43aaf9d8170a.jpg';
        	// $tem['status'] = 1;
        	// $tem['cate_id'] = rand(1,10);
        	$data[] = $tem;
        }
        DB::table('answer')->insert($data);
    }
}
